<#include "/common/head2.html"/> 
<div class="easyui-panel addPage" data-options="fit:true,border:false,novalidate:true">
	<form class="easyui-form" id="ff" method="post" data-options="novalidate:true">
		<table>
			<tr>
				<td>
					<span class="adertisement">分值: </span>
				    <input required="ture" class="easyui-validatebox" type="text" id="store" name="store" value="${shopRule.store!''}" />
				    <input type="hidden" value="${shopRule.id!''}" id="id">
				    <input type="hidden" value="${shopRule.searchNumber!''}" id="searchNumber"></input>
					<input type="hidden" value="${shopRule.balance!''}" id="balance"></input>
					<input type="hidden" value="${shopRule.name!''}" id="name"></input>
					<input type="hidden" value="${shopRule.remarks!''}" id="shopSet_id">
					<input type="hidden" value="${shopRule.shopId!''}" id="shopId">
				</td>
			</tr>
			
			<tr>
            	<td>
	            	<div data-options="region:'south',border:false" style="text-align: right; padding: 12px; border-top-width: 0px; border-top-style: solid; border-top-color: rgb(221, 221, 221); width: 674px; height: 28px;" title="" class="panel-body panel-body-noheader panel-body-noborder layout-body">
	            		<a class="easyui-linkbutton color1 l-btn l-btn-small" href="javascript:void(0)" onclick="javascript:save();" style="width: 220px;">
	            			<span class="l-btn-center" style="margin-top: 0px;"><span class="l-btn-text">确定</span></span>
	            		</a>
	        		</div>
            	</td>
            </tr>			
		</table>
	</form>
</div>
<script type="text/javascript">
var id = $("#id").val();
var searchNumber=$("#searchNumber").val();
var balance=$("#balance").val();
var name=$("#name").val();
var shopId=$("#shopId").val();
function save() {
	
	if($("#store").val()==''){
		$.messager.alert('提示','请填写分值');
		return;
	}
	 $("#ff").form('submit', { 
        url: "updateStorePage?id="+id, 
        onSubmit: function () {   
        	//表单提交前的回调函数 
        	if(!$("#ff").form('enableValidation').form('validate')) {
            	$.messager.alert('操作结果','请检查标红输入项','error');
        		return false;
        	}       	
        }, 
        success: function (v) {
        	location.replace("search?id="+shopId+"&name="+name+"&balance="+balance+"&searchNumber="+searchNumber+"&setId="+$("#shopSet_id").val())
    	} 
      });  
}
		
//返回	
function searchback() {
	location.replace("list");
}
</script>
<#include "/common/dialogWindow.html"/>
<#include "/common/foot.html"/>